/***************************************************************************
 *   Copyright (C) 2009 by Marcin Swiechowicz   *
 *   marcin.swiechowicz@gmail.com   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#ifndef KDCSUBTITLEWIDGET_H
#define KDCSUBTITLEWIDGET_H

#include <QWidget>

#include "kdcsubtitlemodel.h"
#include <kdcmovie.h>
#include <KIntNumInput>
#include <QButtonGroup>
#include <KPushButton>
#include <QTableView>

class KDCSubtitleWidget : public QWidget
{
Q_OBJECT
public:
	KDCSubtitleWidget( QObject *aParent = 0 );
	~KDCSubtitleWidget();
	void setMovie( KDCMovie *aMovie );
private slots:
	void add();
	void remove();
	void verticalButtonPressed( int );
	void horizontalButtonPressed( int );
	void setSize( int );
	void slotCurrentRowChanged( const QModelIndex &, const QModelIndex & );
	void setup( bool aEnabled );
	void slotBeginTitleRowsChanged();
	void slotEndTitleRowsChanged();
private:
	KDCSubtitleModel *pModel;
	KDCMovie *pMovie;
	KIntNumInput *pSize;
	QButtonGroup *hBtnGroup;
	QButtonGroup *vBtnGroup;
	int pRow;
	KPushButton *pAddBtn;
	KPushButton *pDelBtn;
	QTableView *pView;
};
#endif
